package com.neusoft.test;

import com.neusoft.config.SpringConfig;
import com.neusoft.model.UmsAdmin;
import com.neusoft.service.UmsAdminService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.Date;

/**
 * @Author: duan
 * @Date: Create in 15:42 2020/10/31
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:applicationContext.xml")
public class SpringDemo {
    @Autowired
    private UmsAdminService umsAdminService;

    @Test
    public void t1() {
        UmsAdmin bean = new UmsAdmin(0L, "hehe", "123", "", "441924919@qq.com", "leo", "note", new Date(), new Date(), 1);
        umsAdminService.insert(bean);
    }

    @Test
    public void t2() {
        UmsAdmin umsAdmin = umsAdminService.queryById(1L);
        System.out.println(umsAdmin);
    }

    @Test
    public void t3() {
        umsAdminService.zhuanZhang();
    }
}
